package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.Role;
import com.example.demo.entity.RoleUserMap;
import com.example.demo.entity.User;
import com.example.demo.entity.UserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {

    IPage<User> selectUserByRoleId(Page<User> page, @Param("roleId") Integer roleId,@Param("username") String username,@Param("phoneNumber") String phoneNumber);

    void addRoleToUser(@Param("roleId") Integer roleId,@Param("ids") List<Integer> ids,@Param("createBy") String createBy);

}
